package inglar.autotc.client;

import inglar.autotc.shared.db.Actions;
import inglar.autotc.shared.db.Templates;

import com.google.gwt.user.client.rpc.AsyncCallback;

/**
 * Wraps the command line utilities of the Linux-based host system.
 * @author Lee
 */
public interface HostServiceAsync {
	void exec(String cmd, AsyncCallback<String> callback);
	void scriptase(String cmd, AsyncCallback<String> callback);
	
	void checkInstallation(AsyncCallback<String> callback);
	
	void login(String username, String password, AsyncCallback<String> callback);
	
	void getDeviceList(String userid, AsyncCallback<String[]> callback);
	
	void getDeviceConfig(String userid, String device, AsyncCallback<String[]> callback);
	void setDeviceConfig(String userid, String device, String settingid, String script, AsyncCallback<String> callback);
	
	void getTemplateList(String userid, AsyncCallback<Templates[]> callback);
	void getTemplateList(String userid, String device, AsyncCallback<String[]> callback);
	void setTemplate(String userid, String device, String name, String script, AsyncCallback<String> callback);
	
	void getClientList(String userid, AsyncCallback<String[]> callback);
	void setClient(String userid, String ipaddr, Integer port, AsyncCallback<String> callback);
	void deleteClient(String userid, String ipaddr, Integer port, AsyncCallback<String> callback);
	
	void netstat(String userid, String ipaddress, Integer port, AsyncCallback<String[]> callback);
	
	void getActionList(String userid, AsyncCallback<String[]> callback);
	void setAction(String userid, Actions action, AsyncCallback<Void> callback);
	void deleteAction(String userid, String actionid, AsyncCallback<String> callback);
}
